//
//  UIView+ZSExtend.h
//  Epayment
//
//  Created by safiri on 2018/6/13.
//  Copyright © 2018年 safiri. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (ZSExtend)

// MARK: - config transform
/// CGAffineTransformMakeScale 放大缩小
@property (nonatomic) CGFloat  scale;
/// CGAffineTransformMakeRotation  旋转角度
@property (nonatomic) CGFloat  angle;


// MARK: - load From nib
+ (UINib *)loadNib;
+ (UINib *)loadNibNamed:(NSString*)nibName;
+ (UINib *)loadNibNamed:(NSString*)nibName bundle:(NSBundle *)bundle;

+ (instancetype)loadInstanceFromNib;
+ (instancetype)loadInstanceFromNibWithName:(NSString *)nibName;
+ (instancetype)loadInstanceFromNibWithName:(NSString *)nibName owner:(id)owner;
+ (instancetype)loadInstanceFromNibWithName:(NSString *)nibName owner:(id)owner bundle:(NSBundle *)bundle;

//MARK: - layer Border

- (void)addBorderWithBorderColor:(UIColor *)color borderWidth:(CGFloat)width top:(BOOL)top left:(BOOL)left bottom:(BOOL)bottom right:(BOOL)right;
- (void)addBottomBorderWithColor:(UIColor *) color andWidth:(CGFloat)borderWidth;
- (void)addLeftBorderWithColor:(UIColor *) color andWidth:(CGFloat)borderWidth;
- (void)addRightBorderWithColor:(UIColor *) color andWidth:(CGFloat)borderWidth;
- (void)addTopBorderWithColor:(UIColor *) color andWidth:(CGFloat)borderWidth;
- (void)hideAllBorders;
- (void)removeAllBorders;

// MARK: - other
/// 移除所有subView
- (void)zsRemoveAllSubViews;
/// 在 block 内禁用动画
+ (void)disableAnimationWithBlock:(void (^)(void))block;
@end
